﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Cabecera.ascx.cs" Inherits="WebControls_Cabecera" %>

<script type="text/javascript">
function cambiarEstilo(estiloNuevo, estiloViejo){
    $('.' + estiloViejo).removeClass(estiloViejo).addClass(estiloNuevo);
}
</script>
<table border="0" cellpadding="0" cellspacing="0" width="996">
    <tr>
        <td>
            <img src="images/img_spacer.gif" alt="" name="undefined_34" width="224" height="1"
                border="0"></td>
        <td>
            <img src="images/img_spacer.gif" alt="" name="undefined_34" width="191" height="1"
                border="0"></td>
        <td>
            <img src="images/img_spacer.gif" alt="" name="undefined_34" width="191" height="1"
                border="0"></td>
        <td>
            <img src="images/img_spacer.gif" alt="" name="undefined_34" width="191" height="1"
                border="0"></td>
        <td>
            <img src="images/img_spacer.gif" alt="" name="undefined_34" width="191" height="1"
                border="0"></td>
        <td>
            <img src="images/img_spacer.gif" alt="" name="undefined_34" width="8" height="1"
                border="0"></td>
        <td>
            <img src="images/img_spacer.gif" alt="" name="undefined_34" width="1" height="1"
                border="0"></td>
    </tr>
    <tr>
        <td colspan="6" style="height: 106px; width: 996" background="images/botonera_home/img_encabezado_home_log_1.jpg">
            <% if (Page.User.Identity.IsAuthenticated)
                       { %>
            <table width="100%" border="0" cellpadding="1" cellspacing="0">
                <tr>
                    <td width="744">
                    </td>
                    <td width="80">
                        <img alt="Silueta" src="images/img_silueta_hombre.jpg" width="80" height="80" />
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
            <% } %>
            <asp:Login ID="Login1" runat="server" OnAuthenticate="Login1_Authenticate" DestinationPageUrl="~/Default.aspx"
                Height="9px" VisibleWhenLoggedIn="False" FailureText="Inicio de session incorrecto."
                Font-Size="Small" ForeColor="Orange">
                <LayoutTemplate>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="744">
                            </td>
                            <td width="252">
                                <table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse">
                                    <tr>
                                        <td background="images/botonera_home/fondo_login.jpg">
                                            <table border="0" cellpadding="0" width="252" cellspacing="0" height="45">
                                                <tr>
                                                    <td style="width: 50px; height: 20px" rowspan="2" align="center">
                                                        <asp:ImageButton ID="LoginButton" CommandName="Login" ValidationGroup="ctl00$Login1"
                                                            runat="server" ImageUrl="~/images/botonera_home/img_flecha_login.gif" /></td>
                                                    <td align="left" valign="bottom" style="height: 20px">
                                                        <asp:TextBox ID="UserName" CssClass="textLogin" Height="11px" Width="100px" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                                            ErrorMessage="El nombre de usuario es obligatorio." ToolTip="El nombre de usuario es obligatorio."
                                                            ValidationGroup="ctl00$Login1" Font-Size="Small" ForeColor="Orange">*</asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" valign="bottom" style="height: 20px">
                                                        <asp:TextBox ID="Password" CssClass="textLogin" Height="11px" Width="100px" runat="server"
                                                            TextMode="Password"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                                            ErrorMessage="La contraseña es obligatoria." ToolTip="La contraseña es obligatoria."
                                                            ValidationGroup="ctl00$Login1" Font-Size="Small" ForeColor="Orange">*</asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" style="color: Orange; font-size: small">
                                            <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
            </asp:Login>
        </td>
    </tr>
    <tr>
        <td>
            <img name="encabezado_home_r2_c1" src="images/botonera_home/img_encabezado_home_log_2.jpg"
                width="224" height="20" border="0" alt=""></td>
        <td>
            <%if (Page.Request.QueryString["Seccion"] == "FichaLibro")
              { %>
            <img name="biblioteca_virtual" id="Img1" src="images/botonera_home/img_biblioteca_virtual_sobre.gif"
                width="191" height="20" border="0" alt="" />
            <%}
              else
              {%>
             <div id="divBibliotecaVirtual"  onclick="javascript: location.href='ListaLibro.aspx?Seccion=FichaLibro';" onmouseout="cambiarEstilo('bibliotecaVirtual','bibliotecaVirtual_sobre');" onmouseover="cambiarEstilo('bibliotecaVirtual_sobre','bibliotecaVirtual');" class="bibliotecaVirtual"></div>
            <%} %>
            
        </td>
        <td>
            <div class="neoTexto" onmouseout="cambiarEstilo('neoTexto','neoTexto_sobre');" onmouseover="cambiarEstilo('neoTexto_sobre','neoTexto');"></div>
            
        </td>
        <td>
            <div class="confiesoLei" onmouseout="cambiarEstilo('confiesoLei','confiesoLei_sobre');" onmouseover="cambiarEstilo('confiesoLei_sobre','confiesoLei');"></div></td>
        <td>
            <% if (Page.User.Identity.IsAuthenticated && ((NEXEntidad.Usuario)Session["Usuario"]).EsAdministrador)
               { %>
            <asp:ImageButton ID="btnEventosCulturales" Width="191" Height="20" ImageUrl="~/images/botonera_home/img_eventosCulturales.gif"
                runat="server" OnClick="btnEventosCulturales_Click" />
            <% }
               else
               { %>
            <div class="acercaNeo" onmouseout="cambiarEstilo('acercaNeo','acercaNeo_sobre');" onmouseover="cambiarEstilo('acercaNeo_sobre','acercaNeo');">
            </div>
            <% } %>
        </td>
        <td>
            <img name="encabezado_home_r2_c6" src="images/botonera_home/img_encabezado_home_log_3.jpg"
                width="8" height="20" border="0" alt="">
        </td>
        <td>
            <img src="images/img_spacer.gif" alt="" name="undefined_34" width="1" height="20"
                border="0"></td>
    </tr>
</table>
